\(\int \frac {\sec ^8(c+d x)}{(a+i a \tan (c+d x))^4} \, dx\) [151]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 24, antiderivative size = 90 \[ \int \frac {\sec ^8(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {8 x}{a^4}+\frac {8 i \log (\cos (c+d x))}{a^4 d}-\frac {4 \tan (c+d x)}{a^4 d}-\frac {i (a-i a \tan (c+d x))^2}{a^6 d}-\frac {i (a-i a \tan (c+d x))^3}{3 a^7 d} \]

[Out]

8*x/a^4+8*I*ln(cos(d*x+c))/a^4/d-4*tan(d*x+c)/a^4/d-I*(a-I*a*tan(d*x+c))^2/a^6/d-1/3*I*(a-I*a*tan(d*x+c))^3/a^
7/d

Rubi [A] (verified)

Time = 0.10 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {3568, 45} \[ \int \frac {\sec ^8(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=-\frac {i (a-i a \tan (c+d x))^3}{3 a^7 d}-\frac {i (a-i a \tan (c+d x))^2}{a^6 d}-\frac {4 \tan (c+d x)}{a^4 d}+\frac {8 i \log (\cos (c+d x))}{a^4 d}+\frac {8 x}{a^4} \]

[In]

Int[Sec[c + d*x]^8/(a + I*a*Tan[c + d*x])^4,x]

[Out]

(8*x)/a^4 + ((8*I)*Log[Cos[c + d*x]])/(a^4*d) - (4*Tan[c + d*x])/(a^4*d) - (I*(a - I*a*Tan[c + d*x])^2)/(a^6*d
) - ((I/3)*(a - I*a*Tan[c + d*x])^3)/(a^7*d)

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 3568

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[1/(a^(m - 2)*b
*f), Subst[Int[(a - x)^(m/2 - 1)*(a + x)^(n + m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x
] && EqQ[a^2 + b^2, 0] && IntegerQ[m/2]

Rubi steps \begin{align*} \text {integral}& = -\frac {i \text {Subst}\left (\int \frac {(a-x)^3}{a+x} \, dx,x,i a \tan (c+d x)\right )}{a^7 d} \\ & = -\frac {i \text {Subst}\left (\int \left (-4 a^2-2 a (a-x)-(a-x)^2+\frac {8 a^3}{a+x}\right ) \, dx,x,i a \tan (c+d x)\right )}{a^7 d} \\ & = \frac {8 x}{a^4}+\frac {8 i \log (\cos (c+d x))}{a^4 d}-\frac {4 \tan (c+d x)}{a^4 d}-\frac {i (a-i a \tan (c+d x))^2}{a^6 d}-\frac {i (a-i a \tan (c+d x))^3}{3 a^7 d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.11 (sec) , antiderivative size = 56, normalized size of antiderivative = 0.62 \[ \int \frac {\sec ^8(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {-24 i \log (i-\tan (c+d x))-21 \tan (c+d x)+6 i \tan ^2(c+d x)+\tan ^3(c+d x)}{3 a^4 d} \]

[In]

Integrate[Sec[c + d*x]^8/(a + I*a*Tan[c + d*x])^4,x]

[Out]

((-24*I)*Log[I - Tan[c + d*x]] - 21*Tan[c + d*x] + (6*I)*Tan[c + d*x]^2 + Tan[c + d*x]^3)/(3*a^4*d)

Maple [A] (verified)

Time = 0.53 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.93

method result size
derivativedivides \(-\frac {7 \tan \left (d x +c \right )}{a^{4} d}+\frac {\tan ^{3}\left (d x +c \right )}{3 a^{4} d}+\frac {2 i \left (\tan ^{2}\left (d x +c \right )\right )}{a^{4} d}+\frac {8 \arctan \left (\tan \left (d x +c \right )\right )}{a^{4} d}-\frac {4 i \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{a^{4} d}\) \(84\)
default \(-\frac {7 \tan \left (d x +c \right )}{a^{4} d}+\frac {\tan ^{3}\left (d x +c \right )}{3 a^{4} d}+\frac {2 i \left (\tan ^{2}\left (d x +c \right )\right )}{a^{4} d}+\frac {8 \arctan \left (\tan \left (d x +c \right )\right )}{a^{4} d}-\frac {4 i \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{a^{4} d}\) \(84\)
risch \(\frac {16 x}{a^{4}}+\frac {16 c}{a^{4} d}-\frac {4 i \left (6 \,{\mathrm e}^{4 i \left (d x +c \right )}+15 \,{\mathrm e}^{2 i \left (d x +c \right )}+11\right )}{3 d \,a^{4} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{3}}+\frac {8 i \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{a^{4} d}\) \(84\)

[In]

int(sec(d*x+c)^8/(a+I*a*tan(d*x+c))^4,x,method=_RETURNVERBOSE)

[Out]

-7*tan(d*x+c)/a^4/d+1/3/a^4/d*tan(d*x+c)^3+2*I/a^4/d*tan(d*x+c)^2+8/a^4/d*arctan(tan(d*x+c))-4*I/a^4/d*ln(1+ta
n(d*x+c)^2)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 156, normalized size of antiderivative = 1.73 \[ \int \frac {\sec ^8(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {4 \, {\left (12 \, d x e^{\left (6 i \, d x + 6 i \, c\right )} + 12 \, d x + 6 \, {\left (6 \, d x - i\right )} e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, {\left (12 \, d x - 5 i\right )} e^{\left (2 i \, d x + 2 i \, c\right )} - 6 \, {\left (-i \, e^{\left (6 i \, d x + 6 i \, c\right )} - 3 i \, e^{\left (4 i \, d x + 4 i \, c\right )} - 3 i \, e^{\left (2 i \, d x + 2 i \, c\right )} - i\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) - 11 i\right )}}{3 \, {\left (a^{4} d e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, a^{4} d e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, a^{4} d e^{\left (2 i \, d x + 2 i \, c\right )} + a^{4} d\right )}} \]

[In]

integrate(sec(d*x+c)^8/(a+I*a*tan(d*x+c))^4,x, algorithm="fricas")

[Out]

4/3*(12*d*x*e^(6*I*d*x + 6*I*c) + 12*d*x + 6*(6*d*x - I)*e^(4*I*d*x + 4*I*c) + 3*(12*d*x - 5*I)*e^(2*I*d*x + 2
*I*c) - 6*(-I*e^(6*I*d*x + 6*I*c) - 3*I*e^(4*I*d*x + 4*I*c) - 3*I*e^(2*I*d*x + 2*I*c) - I)*log(e^(2*I*d*x + 2*
I*c) + 1) - 11*I)/(a^4*d*e^(6*I*d*x + 6*I*c) + 3*a^4*d*e^(4*I*d*x + 4*I*c) + 3*a^4*d*e^(2*I*d*x + 2*I*c) + a^4
*d)

Sympy [F]

\[ \int \frac {\sec ^8(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {\int \frac {\sec ^{8}{\left (c + d x \right )}}{\tan ^{4}{\left (c + d x \right )} - 4 i \tan ^{3}{\left (c + d x \right )} - 6 \tan ^{2}{\left (c + d x \right )} + 4 i \tan {\left (c + d x \right )} + 1}\, dx}{a^{4}} \]

[In]

integrate(sec(d*x+c)**8/(a+I*a*tan(d*x+c))**4,x)

[Out]

Integral(sec(c + d*x)**8/(tan(c + d*x)**4 - 4*I*tan(c + d*x)**3 - 6*tan(c + d*x)**2 + 4*I*tan(c + d*x) + 1), x
)/a**4

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 53, normalized size of antiderivative = 0.59 \[ \int \frac {\sec ^8(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {\frac {\tan \left (d x + c\right )^{3} + 6 i \, \tan \left (d x + c\right )^{2} - 21 \, \tan \left (d x + c\right )}{a^{4}} - \frac {24 i \, \log \left (i \, \tan \left (d x + c\right ) + 1\right )}{a^{4}}}{3 \, d} \]

[In]

integrate(sec(d*x+c)^8/(a+I*a*tan(d*x+c))^4,x, algorithm="maxima")

[Out]

1/3*((tan(d*x + c)^3 + 6*I*tan(d*x + c)^2 - 21*tan(d*x + c))/a^4 - 24*I*log(I*tan(d*x + c) + 1)/a^4)/d

Giac [A] (verification not implemented)

none

Time = 0.73 (sec) , antiderivative size = 154, normalized size of antiderivative = 1.71 \[ \int \frac {\sec ^8(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=-\frac {2 \, {\left (-\frac {12 i \, \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}{a^{4}} + \frac {24 i \, \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - i\right )}{a^{4}} - \frac {12 i \, \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}{a^{4}} + \frac {22 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 21 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 78 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 46 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 78 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 21 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 22 i}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{3} a^{4}}\right )}}{3 \, d} \]

[In]

integrate(sec(d*x+c)^8/(a+I*a*tan(d*x+c))^4,x, algorithm="giac")

[Out]

-2/3*(-12*I*log(tan(1/2*d*x + 1/2*c) + 1)/a^4 + 24*I*log(tan(1/2*d*x + 1/2*c) - I)/a^4 - 12*I*log(tan(1/2*d*x
+ 1/2*c) - 1)/a^4 + (22*I*tan(1/2*d*x + 1/2*c)^6 - 21*tan(1/2*d*x + 1/2*c)^5 - 78*I*tan(1/2*d*x + 1/2*c)^4 + 4
6*tan(1/2*d*x + 1/2*c)^3 + 78*I*tan(1/2*d*x + 1/2*c)^2 - 21*tan(1/2*d*x + 1/2*c) - 22*I)/((tan(1/2*d*x + 1/2*c
)^2 - 1)^3*a^4))/d

Mupad [B] (verification not implemented)

Time = 3.76 (sec) , antiderivative size = 60, normalized size of antiderivative = 0.67 \[ \int \frac {\sec ^8(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=-\frac {\frac {7\,\mathrm {tan}\left (c+d\,x\right )}{a^4}-\frac {{\mathrm {tan}\left (c+d\,x\right )}^3}{3\,a^4}+\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )-\mathrm {i}\right )\,8{}\mathrm {i}}{a^4}-\frac {{\mathrm {tan}\left (c+d\,x\right )}^2\,2{}\mathrm {i}}{a^4}}{d} \]

[In]

int(1/(cos(c + d*x)^8*(a + a*tan(c + d*x)*1i)^4),x)

[Out]

-((log(tan(c + d*x) - 1i)*8i)/a^4 + (7*tan(c + d*x))/a^4 - (tan(c + d*x)^2*2i)/a^4 - tan(c + d*x)^3/(3*a^4))/d